package com.cy.server.mapper;

import com.cy.server.dto.DepartmentDto;
import com.cy.server.pojo.Department;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * <p>
 *  Mapper 接口
 * </p>
 *
 * @author LiShaoZhuo
 * @since 2021-04-26
 */
public interface DepartmentMapper extends BaseMapper<Department> {

    /**
     * @Description: 部门信息分页
     * @Param: departmentDto
     * @return:
     * @Author: LiShaoZhuo
     * @Date: 2021/4/30
     */
    List<Department> selectAllDepartments(DepartmentDto departmentDto);

    /**
     * @Description: 新增部门信息
     * @Param:
     * @return:
     * @Author: LiShaoZhuo
     * @Date: 2021/4/30
     */
    void addDepartment(Department department);

    /**
     * @Description: 删除部门信息
     * @Param:
     * @return:
     * @Author: LiShaoZhuo
     * @Date: 2021/4/30
     */
    void deleteDepartment(Department department);

    /**
     * @Description: 查询所有部门信息
     * @Param:
     * @return:
     * @Author: LiShaoZhuo
     * @Date: 2021/5/6
     */
    List<Department> getAllDepartments(Integer parentId);
}
